<template>
  <!-- {{iurl}} -->


    <!-- <img v-if="src.indexOf('http') > -1" :src="src" />
    <img v-else :src="picurl + '/' + src" /> -->


 <img :src="url"  class="v-image" >

  <!-- <el-image :src="iurl" @error="errorimg" :lazy='true'></el-image> -->
</template>

<script>
import {mapState} from 'vuex';
import {mapGetters} from 'vuex';
export default {
  props: {
    src: ''
  },
  data() {
    return {
      // url:''
    };
  },
  computed: {
    url(){
      if(!this.src){
        return ''
      }
      console.log(this.src)
      if(this.src.indexOf('http') > -1){
        return this.src
      }else{
        if(this.src.indexOf('base64')>-1){
          return this.src
        }
        if(this.picurl){
          return this.picurl + '/' + this.src
        }
      }
    },
    ...mapGetters(['picurl'])
  },
  created() {},
  methods: {
    errorimg(e) {}
  }
};
</script>

<style lang="scss">
.image-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  // background: #f5f7fa;
  color: #909399;
  // font-size: ;
}
.v-image {
  width: 100%;
  height: 100%;

}
</style>
